home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 16819 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.5 KB

  1. Path: news.itsyd.bhp.com.au!news
  2. From: Richard Bowen <bowen.richard.rw@bhp.com.au>
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: "Pure virtual function called" error with Sparcworks
  5. Date: Fri, 12 Apr 1996 13:10:49 +1100
  6. Organization: BHP IT
  7. Message-ID: <316DBBA9.23FA@bhp.com.au>
  8. References: <316B8607.41C67EA6@jpmorgan.com> <Pine.OSF.3.91.960411112749.11275A-100000@bud.cc.swin.edu.au>
  9. NNTP-Posting-Host: 134.18.154.118
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0 (WinNT; I)
  14.  
  15. John Joseph Newbigin wrote:
  16. > On Wed, 10 Apr 1996, Oliver Peck wrote:
  17. > > I am using V4.0.1 of the Sparcworks C++ compiler.
  18. > >
  19. > > A program is occasionally crashing with the message:-
  20. > >
  21. > > "****  Pure virtual function called"
  22. > >
  23. > > Does anyone know what this may mean?
  24. > >
  25. > If you have a class that inherits another class with a pure virtual
  26. > function, you MUST write this function for your class because it is only
  27. > a deffition in the class you are inhereting.  I have never used this but
  28. > I assume borland C++ would not alow this to compile but I don't know
  29. > about other compilers.  The compiler may be providing a stub. with this
  30. > error to alow your program to compile.  To overcome this you will have
  31. > to write the function for one of the classes(or both).   .....I think:)
  32. >  Newbs
  33.  
  34. The compiler shouldn't let you compile without the function being 
  35. written.  What probably happened is you are calling an abstract function in 
  36. an object that has been deleted.
  37.  
  38. Richard
  39.